package Operation;

import java2021_9_23.BookDao;

import java.util.Scanner;

public class BorrowOperation implements IOperation{
    @Override
    public void work() {
        System.out.println("借书");
        BookDao bookDao = new BookDao();
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入要借阅的书籍id:>");
        int bookId = scanner.nextInt();
        boolean ret = bookDao.borrowBook(bookId);
        if(ret){
            System.out.println("成功借出!");
        }else{
            System.out.println("借阅书籍失败!");
        }

    }
}
